home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kentucky Virtual Art Museum
/
Kentucky Virtual Art Museum.iso
/
site
/
museums
/
zoomify
/
wednesday.swf
/
scripts
/
DefineSprite_50
/
frame_1
/
DoAction.as
Wrap
Text File
|
2005-02-22
|
1KB
|
41 lines
function StartDragLabel(launchURL)
{
if(this.gLabelsEditableFlag == true)
{
this.gStartTextX = this._parent._x;
this.gStartTextY = this._parent._y;
this.gStartLabelX = this.gGraphicMovieClip._x;
this.gStartLabelY = this.gGraphicMovieClip._y;
this.gLabelDragIntervalID = setInterval(this,"LabelIsDragging",10);
this._parent.startDrag();
}
else if(this.gZoomifyURL != undefined && this.gZoomifyURL != "")
{
getURL(this.gZoomifyURL,"_blank");
}
}
function StopDragLabel()
{
if(this.gLabelsEditableFlag == true)
{
this._parent.stopDrag();
clearInterval(this.gLabelDragIntervalID);
if(this.gLabelMovedCallback != "")
{
var xRI = Math.round(10000 * (this.gBackgroundTierWidth / 2 - this._parent._x) / this.gBackgroundTierWidth) / 10000;
var yRI = Math.round(10000 * (this.gBackgroundTierHeight / 2 - this._parent._y) / this.gBackgroundTierHeight) / 10000;
this.gLabelMovedCallback(xRI,yRI);
}
}
}
function LabelIsDragging()
{
this.gGraphicMovieClip._x = this.gStartLabelX + (this._parent._x - this.gStartTextX);
this.gGraphicMovieClip._y = this.gStartLabelY + (this._parent._y - this.gStartTextY);
}
var gStartLabelX;
var gStartLabelY;
var gStartTextX;
var gStartTextY;
var gLabelDragIntervalID;